Platform Explorer / Nuxeo Platform 2021.7

Extension point elasticSearchIndex

Documentation

Extension point used to setup an Elasticsearch index.

The one used to index Nuxeo documents must be of type "doc".

    <elasticSearchIndex create="true" name="nuxeo" type="doc">
        <settings/>
        <mapping/>
        <fetchFromSources>
            <include>ecm:*</include>
            <include>dc:*</include>
            <exclude>ecm:binaryFulltext</exclude>
        </fetchFromSources>
    </elasticSearchIndex>

@Since 5.9.3 name is the Elasticsearch index name.

type is the Elasticsearch type that hold a mapping, "doc" is the mapping for Nuxeo documents

create can be set to false if you don't want Nuxeo to initialize the index and mapping.

settings the Elasticsearch settings @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/index-modules.html

mapping the Elasticsearch mapping for the type @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping.html

@Since 5.9.5 fetchFromSources, include a list of field name pattern that will be included when fetching document from Elasticsearch (@see NxQueryBuilder.fetchFromElasticsearch) use the exclude list to prevent returning fulltext or long fields.

Contribution Descriptors

  • Class: org.nuxeo.elasticsearch.config.ElasticSearchIndexConfig

Existing Contributions

Contributions are presented in the same order as the registration order on this extension point. This order is displayed before the contribution name, in brackets.

  • nuxeo-runtime-2021.7.15.jar /opt/nuxeo/server/nxserver/config/elasticsearch-config.xml
    <extension point="elasticSearchIndex" target="org.nuxeo.elasticsearch.ElasticSearchComponent">
        <elasticSearchIndex manageAlias="false" name="nuxeo" repository="default" type="doc">
          <fetchFromSource>
            <include>ecm:*</include>
            <include>dc:*</include>
            <exclude>ecm:binarytext</exclude>
          </fetchFromSource>
          <settings file="elasticsearch-doc-settings.json"/>
          <mapping file="elasticsearch-doc-mapping.json"/>
        </elasticSearchIndex>
      </extension>
  • nuxeo-runtime-2021.7.15.jar /opt/nuxeo/server/nxserver/config/elasticsearch-audit-index-config.xml
    <extension point="elasticSearchIndex" target="org.nuxeo.elasticsearch.ElasticSearchComponent">
    
        <elasticSearchIndex name="nuxeo-audit" type="entry">
          <settings file="elasticsearch-audit-settings.json"/>
          <mapping file="elasticsearch-audit-mapping.json"/>
        </elasticSearchIndex>
    
      </extension>
  • nuxeo-runtime-2021.7.15.jar /opt/nuxeo/server/nxserver/config/elasticsearch-sequence-index-config.xml
    <extension point="elasticSearchIndex" target="org.nuxeo.elasticsearch.ElasticSearchComponent">
    
        <elasticSearchIndex name="nuxeo-uidgen" type="seqId">
    
          <settings>
            {
            "number_of_shards" : 1,
            "index.translog.durability": "request",
            "auto_expand_replicas" : "0-all"
            }
          </settings>
    
          <mapping>
            {
            "_source" : {"enabled": false},
            "enabled" : false
            }
          </mapping>
    
        </elasticSearchIndex>
    
      </extension>